package com.example.demo.mapper;

import com.example.demo.entity.Goods;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface GoodsMapper {
    /**
     *增加商品
     * @param goods
     * @throw Exception
     */
    void insertGoods(Goods goods) throws Exception;
    /**
     * 删除商品
     * @param GNo
     * @throw Exception
     */
    void deleteGoods(String GNo) throws Exception;
    /**
     * 修改商品
     * @param goods
     * @throw Exception
     */
    void updateGoods(Goods goods) throws Exception;
    /**
     * 根据GNo查找
     * @return
     * @throw Exception
     */
    Goods findByGNo(String GNo) throws Exception;

    List<Goods> selectAll() throws Exception;
}
